package com.kartoshka.painters 
{
	import com.kartoshka.interfaces.IPainter;

	import flash.display.Graphics;

	/**
	 * @author Alexander Zats, 2009
	 */
	public class NullPainter implements IPainter 
	{

		protected var _cornerRadius : Number;

		public function NullPainter()
		{
			_cornerRadius = 0;
		}

		public function draw(graphics : Graphics, width : Number, height : Number) : void
		{
			graphics.beginFill( 0x000000, 0 );
			_cornerRadius ? graphics.drawRoundRect( 0, 0, width, height, _cornerRadius, _cornerRadius ) : graphics.drawRect( 0, 0, width, height );
			graphics.endFill( );
		}

		public function set cornerRadius( value : Number ) : void
		{
			if ( value < 0 ) value = 0;
			_cornerRadius = value;
		}

		public function get cornerRadius() : Number
		{
			return _cornerRadius;
		}
	}
}
